<?php

include_once "src/controller/dbmanagement/Connection.php";

class DBManager {

    public static function addEmailToNotificationList($email) {
        try {
            $cnn = new Connection();
            $sql = "INSERT INTO NOTIFICATION_LIST SET ";
            $sql .="Email = '" . $email . "'";

            if (!$cnn->execute($sql)) {
                throw new Exception("Invalid Email");
            }
            $cnn->disconnect();
        } catch (Exception $e) {
            throw $e;
        }
    }

}
?>
